<!DOCTYPE html>
<html lang="en">

<head>
	<{include file="header.html" }>
		<title>待分班学员-学员管理-
			<{$user_data[ 'school_name']}>-德安信会计在线教育平台</title>
</head>

<body>
	<div class="wrap">
		<!--star left-->
		<div class="column">
			<{include file="left_menu.html" }>
		</div>
		<div id="ContMianBox">
			<!--star子栏目-->
			<div class="sub-colum">
                <div class="tit"><{$left_menu_min.menu}></div>
                <ul>
                    <{foreach from=$left_menu_min.list item=item}>
                    <li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
                    <{/foreach}>
                </ul>
            </div>
			<!--end子栏目-->
			<!--end left-->
			<div class="container narrow">
				<!--star conter-->
				<div class="cetContent">
					<div class="tit p-lr20">
						<span class="curr">待分班学员</span>
					</div>

					<!--star内容区域-->
					<div class="mainScroll">
						<div class="mainContainer line-all">
							<!--star tabMainCont-->
							<div class="tabMainCont">

								<fieldset class="layui-elem-field">
									<legend>筛选</legend>
									<div class="layui-field-box">
										<form class="layui-form layui-form-pane1" method="post">
											<div class="layui-form-item">
                                                <div class="layui-inline">
														<input type="text" name="name" value="<{if !empty($conditions.name)}><{$conditions.name}><{/if}>" placeholder="学员姓名" autocomplete="off" class="layui-input">
												</div>
												<div class="layui-inline">
                                                    <select name="school_campus_id">
                                                        <option value="0" >校区筛选</option>
                                                        <{foreach from=$campus_list item=item}>
                                                            <option value="<{$item.id}>" <{if isset($conditions.school_campus_id) && $item.id==$conditions.school_campus_id}>selected=selected<{/if}>><{$item.name}></option>
                                                        <{/foreach}>
                                                    </select>
                                                </div>

                                                <div class="layui-inline">
	                                                <select name="course_cate" style="width: 500px;" lay-filter="course_cate" lay-verify="required">
														<option value="0">请选择课程分类</option>
														<{foreach from=$course_cate item=item}>
														<option value="<{$item['id']}>" <{if isset($conditions.course_cate) && $item.id==$conditions.course_cate}>selected<{/if}>><{$item['name']}></option>
														<{/foreach}>
													</select>
												</div>

												<div class="layui-inline">
													<select name="course_id" id="course_id" lay-filter="course_id" style="width: 500px;" lay-verify="required">
														<option value="0">请选择课程</option>
													</select>
												</div>

                                                
                                            </div>
											<div class="layui-form-item">
												<div class="layui-inline">
													<input type="text" name="mobile" value="<{if !empty($conditions.mobile)}><{$conditions.mobile}><{/if}>" placeholder="手机号码" autocomplete="off" class="layui-input">
												</div>
                                                <div class="layui-inline">
                                                    <input type="text" name="st" placeholder="开始日"  class="layui-input" value='<{if $conditions['st'] != 0}><{$conditions['st']}><{/if}>' id="LAY_demorange_s">
                                                </div>
                                                <div class="layui-inline">
                                                    <input type="text" name="et" placeholder="截止日"  class="layui-input" value='<{if $conditions['et'] != 0}><{$conditions['et']}><{/if}>' id="LAY_demorange_e">
                                                </div>
												<div class="layui-inline">
													<button type="submit" class="layui-btn">搜索</button>
													<a class="layui-btn" href="/student/add"><i class="layui-icon"></i> 新增学员</a>
												</div>

											</div>

										</form>
									</div>
								</fieldset>
								<!--商品列表 star-->
								<div class="goods_list p-t10">
									<div class="mtc_tab">
										<!--star mt-->
										<div class="mt">
											<span class="l fs16">状态：</span>
											<a href="/student">全部</a>
											<a href="javascript:;" class="curr">待分班学员</a>
											<!-- <a href="javascript:;">已结业</a> -->

										</div>
										<!--end mt-->
										<!--star mc-->
										<div class="mc">

											<div class="u_table_list m-t20">
												<!--star 商品-->
												<div class="table002">
													<table class="layui-table" lay-skin="line">
														<colgroup>
															<col width="%">
															<col width="%">
															<col width="%">
															<col width="%">
															<col width="%">
															<col width="%">
															<col width="%">
														</colgroup>
														<tbody>
															<tr>
																<th>学员编号</th>
																<th>学员姓名</th>
																<th>联系电话</th>
																<th>校区</th>
																<th>课程</th>
																<th>单号</th>
																<th>报名时间</th>
																<th>状态</th>

																<th>操作</th>
															</tr>
														</tbody>
														<tbody>
															<{foreach from=$student item=item}>
																<tr>
																	<td class="not_lb tal">
																		<{$item[ 'student_id']}>
																	</td>
																	<td class="not_lb tal">
																		
																				<div class="p-tb5">
																					<{$item[ 'name']}>
																				</div>
																			
																		</dl>

																		<!-- <div class="product_name">
																			<div class="t_img"><img src="<{$item['head_image_url']}>" /></div>
																			<div class="t_info">
																				<a class="" style="padding-top:20px;" href="javascript:;">
																					姓名<{$item[ 'name']}>
																				</a>

																			</div>
																		</div> -->
																	</td>
																	<td class="not_lb tal"><span class="c-ff6d5e"><{$item[ 'mobile']}></span></td>
																	<td class="not_lb tal">
																	<{$item[ 'campus_name']}>
																	</td>
																	<td class="not_lb tal"><span class="c-ff6d5e"><{$item[ 'title']}></span></td>
																	<td class="not_lb tal">
																		<{$item[ 'order_num']}>
																	</td>
																	<td class="not_lb tal">
																		<{$item[ 'order_time']|date_format: '%Y-%m-%d'}>
																	</td>
																	<td class="not_lb tal">
																		未分班
																	</td>
																	<td class="not_lb tal">
																		<div class="colorBtn">

																			<p><a href="/student/allot_class/<{$item['course_id']}>">分配班级</a></p>
																		</div>
																	</td>
																</tr>
																<{/foreach}>
														</tbody>
													</table>
												</div>
												<!--end 商品-->
											</div>
											<div class="pages p-tb20 hide" style="text-align:right;">
												<div class="l">
													<a href="javascript:;" class="zent-btn">未知按钮</a>
													<a href="javascript:;" class="zent-btn">未知按钮</a>
													<a href="javascript:;" class="zent-btn">未知按钮</a>
													<a href="javascript:;" class="zent-btn">未知按钮</a>
												</div>
												<ul>
													<li><a>上一页</a></li>
													<li><a>1</a></li>
													<li class="active"><a>2</a></li>
													<li><a>3</a></li>
													<li><a>4</a></li>
													<li>...</li>
													<li><a>100</a></li>
													<li><a>下一页</a></li>
												</ul>
												<form>
													共100页到第
													<input type="text" value="1" class="inputwh"> 页
												</form>
											</div>
										</div>
										<!--end mc-->
									</div>

								</div>
								<!--商品列表 end -->
							</div>
							<!--end tabMainCont-->
						</div>

					</div>
				</div>
				<!--end内容区域-->

				<!--end conter-->
			</div>


		</div>
	</div>
	<{include file="footer.html"}>
</body>
<script>
    layui.use(['form','laydate','jquery'], function(){
		var laydate = layui.laydate;
		var form = layui.form(),$ = layui.jquery;

        var start = {
            min: '2016-11-31 23:59:59',
            max: laydate.now(+1),
            istoday: false,
            choose: function(datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };

        var end = {
            min: '2016-11-31 23:59:59',
            max: laydate.now(+1),
            istoday: false,
            choose: function(datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };

        document.getElementById('LAY_demorange_s').onclick = function() {
            start.elem = this;
            laydate(start);
        }
        document.getElementById('LAY_demorange_e').onclick = function() {
            end.elem = this
            laydate(end);
        }

        form.on('select(course_cate)', function(data){
			var ii = layer.load();
			var cate_id = data.value;
			$("#course_id").html('<option value="">请选择课程</option>');
			form.render('select');
			$.ajax({
				type: "POST",
				url: "/classes/get_offline_course_by_cate/"+cate_id,
				dataType:"json",
				success: function(result){
					var html ='';
					$.each(result, function(i, obj) {
						html += '<option value="'+obj.id+'">'+obj.title+'</option>';
					});
					$("#course_id").append(html);
					form.render('select');
					layer.close(ii);
				}
			});
		});
        <{if !empty($conditions.course_cate)}>
        	var ii = layer.load();
			var cate_id = "<{$conditions.course_cate}>";
			var course_id = "<{$conditions.course_id|default:0}>";
			$("#course_id").html('<option value="0">请选择课程</option>');
			form.render('select');
			$.ajax({
				type: "POST",
				url: "/classes/get_offline_course_by_cate/"+cate_id,
				dataType:"json",
				success: function(result){
					var html ='';
					
					$.each(result, function(i, obj) {
						var selected = '';
						if(obj.id == course_id){
							var selected = "selected";
						}
						html += '<option value="'+obj.id+'" '+selected+'>'+obj.title+'</option>';
					});
					$("#course_id").append(html);
					form.render('select');
					layer.close(ii);
				}
			});
       	<{/if}>
    });
</script>
</html>
